﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using DTO;
using System.Data;


namespace BUS
{
    public class Sach_BUS
    {
        //Load Sach:
        public static DataTable LoadSach()
        {
            return Sach_DAO.LoadDSSach();
        }
        //ThemSach:
        public static void ThemSachMoi(Sach_DTO sach)
        {
            Sach_DAO.ThemSach(sach);
        }
        //BanSach:
        public static void BanSach(string masach, int SL)
        {
            Sach_DAO.BanSach(masach, SL);
        }
        //SuaSach:
        public static void SuaSach(Sach_DTO sua)
        {
            Sach_DAO.SuaSach(sua);
        }
        //SoaSach:
        public static void XoaSach(string masach)
        {
            Sach_DAO.XoaSach(masach);
        }
        //TimTheLoai:
        public static DataTable TimTheLoai(string maTL)
        {
            return Sach_DAO.TimTheLoai(maTL);
        }
        //TimTenSach:
        public static DataTable TimTenSach(string tensach)
        {
            return Sach_DAO.TimTenSach(tensach);
        }
        //TimMaSach:
        public static DataTable TimMaSach(string ma)
        {
            return Sach_DAO.TimMaSach(ma);
        }
        //TimNXB:
        public static DataTable TimNXB(string MaNXB)
        {
            return Sach_DAO.TimNXB(MaNXB);
        }





    }
    public class TheLoai_BUS
    {
        public static DataTable Load()
        {
            return TheLoai_DAO.DanhSachTheLoai();
        }
        public static void ThemTL(LoaiSach_DTO loai)
        {
            TheLoai_DAO.ThemTheLoai(loai);
        }
    }

}
